﻿/*========================== 
 * @author 郑金泉
 * @desc 列表属性信息类
 * ========================= */
using System;
using System.Collections.Generic;
using System.Text;

namespace Obsidian.Edm
{
    public class ListAttrInfo : OModel
    {

        private IntField itemsCount;
        private IntField pageNo;
        private IntField pageSize;
        private IntField pagesCount;


        public ListAttrInfo()
        {
            base.InitModel(null, null, new IModelField[] { 
                itemsCount = new IntField(this, null, "itemsCount"),
                pageNo = new IntField(this, null, "pageNo"),
                pageSize = new IntField(this, null, "pageSize"),
                pagesCount = new IntField(this, null, "pagesCount")
            });
            itemsCount.Set(0);
            pageNo.Set(1);
            pageSize.Set(10);
            pagesCount.Set(1);
        }

        /// <summary>
        /// 页码
        /// </summary>
        public IntField PageNo { get { return pageNo; } }

        /// <summary>
        /// 页大小
        /// </summary>
        public IntField PageSize { get { return pageSize; } }

        /// <summary>
        /// 总数据数
        /// </summary>
        public IntField ItemsCount { get { return itemsCount; } }

        /// <summary>
        /// 总页数
        /// </summary>
        public IntField PagesCount { get { return pagesCount; } }

    }
}
